<?php

define("TOKEN","echo_server");

//获取GET参数
$signature = $_GET['signature'];
$nonce = $_GET['nonce'];
$timestamp = $_GET['timestamp'];
$echostr = $_GET['echostr'];

$tmpArr = array($nonce, $timestamp, TOKEN);
sort($tmpArr);

$tmpStr = implods($tmpStr);

$tmpStr = sha1($tmpStr);

if($tmpStr == $signature){
	echo $echostr;
}


?>